import Vue from 'vue';
import Container from './container';
import Main from './main';
import Header from './header';
import Aside from './aside';
import Footer from './footer';
import Icon from './icon';
import IconList from './icon-list';
import Button from './button';
import ButtonGroup from './button-group';
import Row from './row';
import Col from './col';
import Link from './link';
import Radio from './radio';
import RadioButton from './radio-button';
import RadioGroup from './radio-group';
import Checkout from './checkbox';
import CheckoutButton from './checkbox-button';
import CheckoutGroup from './checkbox-group';
import Input from './input';
import ScrollBar from './scrollbar';
import Autocomplate from './autocomplete';
import InputNumber from './input-number';
import Select from './select';
import Option from './option';
import OptionGroup from './option-group';
// import CarouselItem from './carousel-item';
import CascaderPanel from './cascader-panel';
import Cascader from './cascader';
import CascaderMenu from './cascader-panel/src/cascader-menu';
// import Carousel from './carousel';
import Switch from './switch';
import Tooltip from './tooltip';
import Slider from './slider';
import TimePicker from './time-picker';
import TimeSelect from './time-select';
import DatePicker from './date-picker';
import Upload from './upload';
import Rate from './rate';
import ColorPicker from './color-picker';
import Transfer from './transfer';
import Form from './form';
import FormItem from './form-item';
import Notification from './notification';
import Notice from './notice';

const components = [
    Container,
    Main,
    Header,
    Aside,
    Footer,
    Icon,
    IconList,
    Button,
    ButtonGroup,
    Row,
    Col,
    Link,
    Radio,
    RadioButton,
    RadioGroup,
    Checkout,
    CheckoutButton,
    CheckoutGroup,
    Input,
    ScrollBar,
    Autocomplate,
    InputNumber,
    Select,
    Option,
    OptionGroup,
    // CarouselItem,
    CascaderPanel,
    Cascader,
    // Carousel,
    CascaderMenu,
    Switch,
    Tooltip,
    Slider,
    TimePicker,
    TimeSelect,
    DatePicker,
    Upload,
    Rate,
    ColorPicker,
    Transfer,
    Form,
    FormItem,
    Notification,
];


const install = function (Vue, opts = {}) {
    components.forEach(component => {
        Vue.component(component.name, component);
    });
};

if (typeof window !== 'undefined' && window.Vue) {
    install(window.Vue);
}

Vue.prototype.$notify = Notification;
Vue.prototype.$notice = Notice;

export default {
    install,
    Container,
    Main,
    Header,
    Aside,
    Footer,
    Icon,
    IconList,
    Button,
    ButtonGroup,
    Row,
    Col,
    Link,
    Radio,
    RadioGroup,
    RadioButton,
    Checkout,
    CheckoutButton,
    CheckoutGroup,
    Input,
    ScrollBar,
    Autocomplate,
    InputNumber,
    Select,
    Option,
    OptionGroup,
    // CarouselItem,
    CascaderPanel,
    Cascader,
    // Carousel,
    CascaderMenu,
    Switch,
    Tooltip,
    Slider,
    TimePicker,
    TimeSelect,
    DatePicker,
    Upload,
    Rate,
    ColorPicker,
    Transfer,
    Form,
    FormItem,
    Notification,
};
